<div id="request_access_intro" data-header-form>
  <h3 class="text text_h3">{{ site.data.modal['request-access']['header'][page.lang]['title']}}</h3>
  <p class="text">{{ site.data.modal['request-access']['header'][page.lang]['text']}}</p>
  {%- if page.lang == "ru" %}
  <form class="form" action="https://submit-form.com/ldTmy2Q0" id="request_access_form" data-form>
  {%- else %}
  <form class="form" action="https://submit-form.com/aTPe2VQh" id="request_access_form" data-form>
  {%- endif %}
    <input class="form__h0n3y" autocomplete="off" type="text" name="_hp" placeholder="Comment">
    {%- if page.lang == "ru" %}
    <input type="hidden" id="language_ru" name="language" value="ru">
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="name"
        placeholder="Ваше имя" aria-label="Ваше имя"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="email" name="email"
        placeholder="E-mail" aria-label="E-mail"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="tel" name="phone"
        placeholder="Телефон" aria-label="Телефон"
        autocomplete="off" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="company"
        placeholder="Компания" aria-label="Компания"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="position"
        placeholder="Должность" aria-label="Должность"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <select name="preferred_contact" id="contact-select" class="textfield" required="required" onchange="changeHandler(this)">
        <option value="" disabled selected hidden>Предпочтительный способ связи</option>
        <option value="phone">Телефон</option>
        <option value="email">E-mail</option>
        <option value="whats_app">Whats app</option>
        <option value="telegram">Telegram</option>
      </select>
    </div>
    <div class="form__row nickname hidden">
      <input
        class="textfield"
        type="text" name="nickname"
        placeholder="Никнейм" aria-label="Никнейм"
        autocomplete="off" />
    </div>
    <div class="form__row">
      <label class="license-checkbox">
        <input
          class="checkbox"
          type="checkbox" name="license"
          autocomplete="off" required="required" />
        <span class="fake-checkbox"></span>
        <span>Подтверждаю согласие с <a href="https://legal.flant.ru/deckhouse_trialeula_ru" class="license-link" target="_blank">Лицензионным соглашением на пробный период</a></span>
      </label>
    </div>
    <div class="form__row">
      <button class="button button_alt" type="submit">
        Отправить
      </button>
    </div>
    {%- else %}
    <input type="hidden" id="language_en" name="language" value="en">
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="name"
        placeholder="Name" aria-label="Name"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="email" name="email"
        placeholder="E-mail" aria-label="E-mail"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="tel" name="phone"
        placeholder="Phone" aria-label="Phone"
        autocomplete="off" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="company"
        placeholder="Company" aria-label="Company"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <input
        class="textfield"
        type="text" name="position"
        placeholder="Position" aria-label="Position"
        autocomplete="off" required="required" />
    </div>
    <div class="form__row">
      <button class="button button_alt" type="submit">
        Send
      </button>
    </div>
    {%- endif %}
  </form>
</div>
<div id="request_access_success" data-success-message style="display: none;">
  <h3 class="text text_h3 text_alt">{{ site.data.modal['request-access']['success-message'][page.lang]['title']}}</h3>
  <p class="text">{{ site.data.modal['request-access']['success-message'][page.lang]['text']}}</p>
</div>
<div id="request_access_error" data-error-message style="display: none;">
  <h3 class="text text_h3 text_alt">{{ site.data.modal['request-access']['error-message'][page.lang]['title']}}</h3>
  <p class="text">{{ site.data.modal['request-access']['error-message'][page.lang]['text']}}</p>
</div>
